package date;

import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;

public class Demo4 {

	public static void main(String[] args) throws IOException {
		String s="FileOutputStream";
		File f=new File("e:\\sum.txt");
				try{
					FileOutputStream fos=new FileOutputStream(f);
					/*for(int i=0;i<s.length();i++){
						fos.write(s.charAt(i));
					}*/
					fos.write(s.getBytes());
					fos.close();
		
						
				}catch(FileNotFoundException e){
					e.printStackTrace();
				}catch(IOException e){
					e.printStackTrace();
				}
	}

}
